package com.frank.feign;

import com.frank.dto.JobRecordDto;
import com.frank.dto.JsonResult;
import com.frank.model.Job;
import com.frank.model.JobRecord;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "recruit-service")
public interface RecruitFeign {

    @RequestMapping(value = "/recruit/getJobList", method = RequestMethod.GET)
    JsonResult<List<Job>> getJobRecruitListByType(@RequestParam("recruit_type") String recruit_type);

    @RequestMapping(value = "/recruit/submitJobWish", method = RequestMethod.POST)
    JsonResult<?> submitJobWish(@RequestBody JobRecord jobRecord);

    @RequestMapping(value = "/recruit/getJobRecordList", method = RequestMethod.GET)
    JsonResult<List<JobRecordDto>> getJobRecordList(@RequestParam("userId") Integer userId);
}

